
cmake_minimum_required(VERSION 3.5.1)

project(template LANGUAGES CXX VERSION 0.0.1)

# add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") # 这玩意貌似可有可无
include(cmake/SparkEnvConfig.cmake)
include(cmake/SparkMacrosConfig.cmake)
include(cmake/SparkFindLibraries.cmake)
include(cmake/SparkFindQt5Config.cmake)
include(cmake/SparkFindQt6Config.cmake)

include_directories(include)

# 构建插件 plugindemo
    # 如果插件数量多，可以考虑使用宏
spark_add_shared_libraries_path(plugindemo plugins/demo)
target_link_qt5(plugindemo)


# 构建可执行文件 plugin-loader
spark_add_executable_path(plugin-loader src)
target_link_qt5(plugin-loader)

include(cmake/SparkBuildGraphviz.cmake)